import request from '@/config/axios'

export interface CategoryVO {
  id?: number
  parentId?: number
  name: string
  picUrl: string
  sort: number
  status: number
}

export const getCategoryList = (params?: any) => {
  return request.get<CategoryVO[]>({ url: '/product/category/list', params })
}

export const getCategory = (id: number) => {
  return request.get<CategoryVO>({ url: `/product/category/get?id=${id}` })
}